source("~/evo-dispersal/KBGrad/KBGradfunctions.R")



stable.domain<-50

K<-20
lmda<-10
b<-1
n<-2*stable.domain*K
spX<-stable.domain
ngens<-1000
Hmean<-0
Dmean<-1
h2H<-0.3
h2D<-h2H
VPH<-0.05
VPD<-0.5



out<-mother(n=n, spX=spX, K=K, lambda=lmda, b=b, ngens=ngens, Hmean=Hmean, Dmean=Dmean, h2H=h2H, h2D=h2D, VPH=VPH, VPD=VPH, adap=FALSE, evovar=FALSE, stable.domain=stable.domain)

out<-mother.wrapped(n=n, spX=spX, K=K, lambda=lmda, b=b, ngens=ngens, Hmean=Hmean, Dmean=Dmean, h2H=h2H, h2D=h2D, VPH=VPH, VPD=VPH, adap=FALSE, evovar=FALSE, stable.domain=stable.domain)

plotter.mean(popmatrix=out$pop, b=b, stable.domain)	#, filename="~/SRE/oneD/out.pdf") #"~/Desktop/out.pdf"
  	
#save(out, file=paste("/homes/jc227089/KBGrad/EvolD", fID, ".RData", sep=""))
	

